package day03;

import java.util.Scanner;

//关于控制台输入的方法
public class Demo06 {
    /*
    1, 先在package下 import java.util.Scanner;
    2，在main方法中： Scanner scanner = new Scanner(System.in);
    3， System.out.println("请您输入您的年龄");
        int age = scanner.nextInt();
        System.out.println("请输入你商品的价格");
        double price = scanner.nextDouble();
     */
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请您输入您的年龄");
        int age = scanner.nextInt();
        System.out.println("您的年龄为"+age);

        System.out.println("请输入你商品的价格");
        double price = scanner.nextDouble();
        System.out.println("您商品的价格为"+price+"元");


    }
}
